package com.hisense.proxy.service.ncc.iufo;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

/**
 * <p>
 *
 * </p>
 *
 * @author tangxqa
 * @since 2022/10/11 20:36
 */
@Data
public class MeasureMngExcelData {

    @ExcelProperty("danwei")
    private String cellLocation;

    @ExcelProperty("表名")
    private String tableName;

    @ExcelProperty("字段")
    private String tableColumn;



    public int getRow() {
        char[] chars = cellLocation.toCharArray();
        int row = 0;
        for (char c : chars) {
            if (Character.isLetter(c)) {
                continue;
            }
            row = row * 10 + c -48;
        }


        return row;
    }

    public String getColumn() {
        return cellLocation.replace(String.valueOf(getRow()), "");
    }

}
